<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	    <link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
	    <link href="../../css/style.css" rel="stylesheet"/>
	    <link rel="stylesheet" href="../../css/news_list/tea_company.css" />
	    <script src="../../js/statistics.js"></script>
	</head>
		
	<body>
		<header class="mui-bar mui-bar-nav header">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title" id='title'>茶企风采</h1>
		</header>
		<div class="company">
			
		</div>
		<script src="../../plugins/jquery/jquery-3.1.0.min.js" type="text/javascript" ></script>
		<script src="../../plugins/template/template.js"></script>
		<script src="../../plugins/mui/mui.min.js"></script>
		<script src="../../js/getApiToken.js"></script>
		<script src="../../js/md5.js"></script>
		<script id="company-list" type="text/html">
    		<ul>
    			{{each data as value i}}
				<li class="clear" onclick="goCompany({{value.id}})">
					<img src="{{baseUrl}}{{value.path}}">
					<div><span>{{value.title}}</span></div>
				</li>
    			{{/each}}
    		</ul>
    	</script>
		<script type="text/javascript">
			mui.init();
			
			mui.plusReady(function(){
				myAjax('home/tea_company/getLists','get',{},function(data){
					if(data.success){
						var list = {
							data:data.data,
							baseUrl:_baseUrl
						};
						var html = template('company-list',list);
						$(".company").append(html);
					}
				})
			});
			//跳转至茶企页面
    		function goCompany(myid){
    			mui.openWindow({
    				url:'../news_list/tea_company.html',
    				id:'tea_company.html',
    				extras:{
    					detail_id:myid
//  					shareimg:imgSrc
    				},
    				waiting:{
			      		autoShow:true,//自动显示等待框，默认为true
			      		title:'正在加载...',//等待对话框上显示的提示内容
  					},
  					show:{
  						autoShow:true,
  						aniShow:'fade-in'
  					}
    			});
    		}
		</script>
	</body>
</html>